﻿using YnabCsvConverter.Core.Converters;

namespace YnabCsvConverter
{
   using System;
   using System.Collections.Generic;
   using System.Linq;
   using System.Text;
   using System.Windows;
   using System.Windows.Controls;
   using System.Windows.Data;
   using System.Windows.Documents;
   using System.Windows.Input;
   using System.Windows.Media;
   using System.Windows.Media.Imaging;
   using System.Windows.Shapes;

   /// <summary>
   /// Interaction logic for OverwriteOrDeltaPrompt.xaml
   /// </summary>
   public partial class OverwriteOrDeltaPrompt : Window
   {
      /// <summary>
      /// Initializes a new instance of the <see cref="OverwriteOrDeltaPrompt" /> class.
      /// </summary>
      public OverwriteOrDeltaPrompt()
      {
         InitializeComponent();
      }

      /// <summary>
      /// Gets or sets the overwrite delta mode. (Use DialogResult before!)
      /// </summary>
      /// <value>
      /// The overwrite delta mode.
      /// </value>
      public CreationMode CreationMode { get; set; }

      /// <summary>
      /// Handles the cancel click.
      /// </summary>
      /// <param name="sender">The sender.</param>
      /// <param name="e">The <see cref="RoutedEventArgs" /> instance containing the event data.</param>
      /// <exception cref="System.NotImplementedException"></exception>
      private void HandleCancelClick(object sender, RoutedEventArgs e)
      {
         DialogResult = false;
      }

      /// <summary>
      /// Handles the overwrite click.
      /// </summary>
      /// <param name="sender">The sender.</param>
      /// <param name="e">The <see cref="RoutedEventArgs" /> instance containing the event data.</param>
      private void HandleOverwriteClick(object sender, RoutedEventArgs e)
      {
         DialogResult = true;
         CreationMode = CreationMode.All;
      }

      /// <summary>
      /// Handles the delta click.
      /// </summary>
      /// <param name="sender">The sender.</param>
      /// <param name="e">The <see cref="RoutedEventArgs" /> instance containing the event data.</param>
      /// <exception cref="System.NotImplementedException"></exception>
      private void HandleDeltaClick(object sender, RoutedEventArgs e)
      {
         DialogResult = true;
         CreationMode = CreationMode.Delta;
      }

      /// <summary>
      /// Handles the window mouse down.
      /// </summary>
      /// <param name="sender">The sender.</param>
      /// <param name="e">The <see cref="MouseButtonEventArgs" /> instance containing the event data.</param>
      private void HandleWindowMouseDown(object sender, MouseButtonEventArgs e)
      {
         DragMove();
      }
   }
}
